package app.kotlin_1.fragment

import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v7.widget.LinearLayoutManager
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import app.kotlin_1.R
import app.kotlin_1.adapter.NHomeAdapter
import kotlinx.android.synthetic.main.fragment_nhome.view.*

/**
 * Created by 刘智强 on 2017/9/25.
 */
class NHomeFragment : Fragment() {

    override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? {
      var rootView=inflater?.inflate(R.layout.fragment_nhome,container,false)
        rootView?.rvHome?.layoutManager = LinearLayoutManager(activity)
        rootView?.rvHome?.adapter = NHomeAdapter(activity,childFragmentManager)
        return  rootView


    }
//    override fun getLayoutId(): Int = R.layout.fragment_nhome
//    override fun initData() {
//        rootView?.rvHome?.layoutManager = LinearLayoutManager(activity)
//        rootView?.rvHome?.adapter = NHomeAdapter(activity,fragmentManager)
//    }
//
//    override fun initView(v: View) {
//    }
//
//    override fun initListener() {
//    }
//
//    override fun setOnClick(v: View?) {
//    }
//
//    override fun requestData() {
//    }
//
//    override fun setData() {
//    }

}